package com.jimmy.ioc.config;

import com.jimmy.ioc.bean.Car;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

/**
 * @version 1.0
 * @ ClassName MainConfigOfLifeCycle
 * <p> TODO
 * @ author JIMMY
 * @ Date 2020/12/7 0007 上午 11:52
 */
@Configuration
@ComponentScan("com.jimmy.ioc.bean")
public class MainConfigOfLifeCycle {
    @Bean(initMethod = "init",destroyMethod = "destroyed")
//    @Scope("prototype")
    public Car car(){
        return new Car();
    }
}
